package tests;

import common.Utils;
import org.openqa.selenium.By;

/**
 * @author 陶贞
 * @version 1.0
 */
public class EditPage extends Utils {
	public static String url = "http://localhost:8080/blog_edit.html";
	public EditPage() {
		super(url);
	}

	public void editSuc(){
		//输入博客标题
		driver.findElement(By.cssSelector("#title")).sendKeys("老陶的第一篇博客");
		driver.findElement(By.cssSelector("#submit")).click();
		//检查是否发布成功
		String title = driver.findElement(By.cssSelector("body > div.container > div.right > div:nth-child(1) > div.title")).getText();
		assert title.equals("老陶的第一篇博客");
	}
}
